package com.jason.bookworm.dao.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("db1_user")
public class User implements Serializable {
    //类的序列化
    private static final long serialVersionUID = -40356785423868312L;

    @TableId("u_username")
    String username;

    @TableField(value = "u_password", insertStrategy = FieldStrategy.NOT_EMPTY)
    @JSONField(serialize = false)
    String password;

    @TableField(value = "u_privilege", insertStrategy = FieldStrategy.NOT_EMPTY)
    String privilege;

    @TableField("u_nickname")
    String nickname;

    @TableField("u_sex")
    String sex;

    @TableField("u_age")
    Integer age;

    @TableField("u_tel")
    String tel;

    @TableField("u_email")
    String email;

    @TableField("u_introduce")
    String introduce;

    @TableField("u_status")
    String status;
}
